#include <catch2/catch.hpp>

#include "solution.hpp"

using namespace solution_089;

TEST_CASE("89. Gray Code", "[089]") {

CHECK(Solution().grayCode(2) == std::vector{0,1,3,2});
CHECK(Solution().grayCode(1) == std::vector{0,1});
CHECK(Solution().grayCode(3) == std::vector{0,1,3,2,6,7,5,4});
CHECK(Solution().grayCode(4) == std::vector{0,1,3,2,6,7,5,4,12,13,15,14,10,11,9,8});

}
